package com.xsdl.state.pattern;

import com.xsdl.state.State;
import lombok.Getter;
import lombok.Setter;

public class MarioStateMachine {

    @Getter
    @Setter
    private int score;

    @Getter
    @Setter
    private MarioStateService currentStateService;

    public MarioStateMachine() {
        this.score = 0;
        this.currentStateService = SmallMarioStateService.getInstance();
    }

    public void obtainMushRoom() {
        currentStateService.obtainMushRoom(this);
    }

    public void obtainCape() {
        currentStateService.obtainCape(this);
    }

    public void obtainFireFlower() {
        currentStateService.obtainFireFlower(this);
    }

    public void meetMonster() {
        currentStateService.meetMonster(this);
    }

    public State getState() {
        return currentStateService.getState();
    }

}
